package uriel.frankel.model;


public class Pension implements socialThings {
	private double mRemoveFromTaxesSalary;
	private double mAddThisToTaxesSalary = 0;
	private static final int PENSION_TOP_SALARY_2013 = 35312;
	public Pension(double socialPaymentSalary,double pensionPercentage) {
		if (socialPaymentSalary < PENSION_TOP_SALARY_2013) {
			mRemoveFromTaxesSalary = pensionPercentage * socialPaymentSalary;
		} else {
			mRemoveFromTaxesSalary = pensionPercentage * socialPaymentSalary;
			mAddThisToTaxesSalary = (socialPaymentSalary - PENSION_TOP_SALARY_2013)*5*0.01;
		}
	}
	
	
	@Override
	public double addThisMoneyToTaxesSalary() {
		return mAddThisToTaxesSalary;
	}
	
	@Override
	public double removeFromBankSalary(){
		return mRemoveFromTaxesSalary;
	}
	
}